﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Content.master" AutoEventWireup="true" CodeFile="Department.aspx.cs" Inherits="Admin_Department" Theme = "Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
	<div class = "ColumnTitleDiv">
		<asp:Label runat = "server" CssClass = "ColumnName" ID = "LabOperation"></asp:Label>
		<asp:LinkButton runat = "server" CssClass="Add" ID = "BtnToView"></asp:LinkButton>
	</div>
	
	<asp:MultiView runat = "server" ID = "MultiViewViews">
		<asp:View runat = "server" ID = "ViewResult">
			<div class = "QueryDiv">
				<asp:LinkButton runat = "server" Text = "查询全部" ID = "BtnQueryAll"></asp:LinkButton>
				<asp:LinkButton runat = "server" Text = "查询" ID = "BtnToQuery"></asp:LinkButton>
			</div>
			<asp:GridView runat = "server" ID = "GrvDepartments" AutoGenerateColumns = "true" CssClass = "GridView">
				<Columns>
					<asp:TemplateField HeaderText = "选择" ItemStyle-Width = "30px">
						<ItemTemplate>
							<asp:CheckBox runat = "server" ID = "CheckBoxMultiSelect" />
						</ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText = "序号" ItemStyle-Width = "30px">
						<ItemTemplate>
							<%# GrvDepartments.PageIndex*GrvDepartments.PageSize+GrvDepartments.Rows.Count+1 %>
						</ItemTemplate>
					</asp:TemplateField>
					<asp:BoundField HeaderText = "名称" DataField = "Name" />
					<asp:BoundField HeaderText = "上级单位" DataField = "Father" />
					<asp:TemplateField HeaderText = "操作" ItemStyle-Width = "70px">
						<ItemTemplate>
							<asp:LinkButton ID = "BtnEdit" runat = "server" Text = "修改" CommandName = "Edit"></asp:LinkButton>
							<asp:LinkButton ID = "BtnDelete" runat = "server" Text = "删除" CommandName = "Delete" OnClientClick = "javascript:return confirm('确认要删除吗？')"></asp:LinkButton>
						</ItemTemplate>
					</asp:TemplateField>
				</Columns>
			</asp:GridView>
			<div class = "TableDelimiter"></div>
			<div class = "ResultEnd">
				<asp:LinkButton runat = "server" Text = "全选反选" ID = "BtnMultiSelect"></asp:LinkButton>
				<div></div>
				<asp:LinkButton runat = "server" Text = "删除所选" ID = "BtnMultiDelete" OnClientClick = "javascript:return confirm('确认要删除吗？')"></asp:LinkButton>
				<span class="PageNav" style="float: none;">
					<asp:LinkButton ID="BtnFirst" runat="server" Text="第一页"></asp:LinkButton>
					<asp:LinkButton ID="BtnPrev" runat="server" Text="前一页"></asp:LinkButton>
					<asp:LinkButton ID="BtnNext" runat="server" Text="后一页"></asp:LinkButton>
					<asp:LinkButton ID="BtnLast" runat="server" Text="最后一页"></asp:LinkButton>
					第<asp:Label runat="server" ID="LabNowPage"></asp:Label>页/共<asp:Label runat="server" ID="LabTotalPage"></asp:Label>页 
				</span>
			</div>
		</asp:View>

		<asp:View runat = "server" ID = "ViewOperation">
			<table class = "TableForAdd">
				<tbody>
					<tr>
						<td class = "FirstCol">
							名称：
						</td>
						<td>
							<asp:TextBox runat = "server" ID = "TxtName"></asp:TextBox>
						</td>
					</tr>
					<tr>
						<td class = "FirstCol">
							上级单位：
						</td>
						<td>
							<asp:DropDownList runat = "server" ID = "DdlFatherDepartments"></asp:DropDownList>
						</td>
					</tr>
				</tbody>
			</table>
			<div class = "ResultEnd">
				<asp:LinkButton runat = "server" ID = "BtnOperation" CssClass = "Operation"></asp:LinkButton>
			</div>
		</asp:View>
	</asp:MultiView>
</asp:Content>